﻿
/*
 * Copyright (C) Han Wei
 */


using System;


namespace BSvr.Model
{
    /// <summary>
    /// 方法结果类
    /// </summary>
    /// <typeparam name="T">方法返回结果类型</typeparam>
    [Serializable]
    public class OpRst<T>
    {
        /// <summary>
        ///  操作是否成功
        ///  true：成功
        ///  false：失败
        /// </summary>
        public bool IsSuccess { get; set; }
        /// <summary>
        /// 方法返回结果，具体方法含义不同
        /// </summary>
        public T    Result { get; set; }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="isSuc">操作是否成功</param>
        /// <param name="result">操作结果</param>
        public OpRst(bool isSuc, T result) { this.IsSuccess = isSuc; this.Result = result; }
    }
}
